The getOrders method returns an array of Order objects representing all of currently open orders.
var getOrders();
This method returns an array of all open orders.
The following example demonstrates the use of getOrders() method.
function start()
{
//retrieve account's open orders
var account = getAccount();
var openOrders = account.getOrders();
//loop through all orders
for(var i = 0; i < openOrders.length, i++)
{
var order = openOrders[i];
//if order is a market order, do not process it
if(order.getOrderType() == ORDERTYPE_MARKET)
continue;
//continue with the rest of order types...
}
//proceed further...
}
start(), getAccount(), Order class
Copyright © 2006-2009 ActiveTick LLC